﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BusinessDll
{
    public class GlobalInfo
    {
        #region entity
        private static GlobalInfo instance = null;
        private GlobalInfo() { }
        private static object instanceLock= new object();
        public Dictionary<String, String> generalParam = new Dictionary<string, string>() ;
        public CommandList commandList = new CommandList();
        public BusinessControl businessControl;
        public static object createLock = new object();
        public object logLock = new object();
        public LinkedList<viewEntity> viewEntities = new LinkedList<viewEntity>();
        #endregion
        public static GlobalInfo Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (createLock) { 
                        instance = new GlobalInfo();
                    }
                }
                return instance;
            }
        }
        
        //初始化
        public void initData() {
            Dictionary<String, String> map = new Dictionary<string, string>();            
            businessControl = new BusinessControl();
        }
    }
}
